package org.jsola.hr.web;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.jsola.core.Page;
import org.jsola.core.Result;
import org.jsola.hr.dto.TransferAccountInfoAddDTO;
import org.jsola.hr.dto.TransferAccountInfoUpdateDTO;
import org.jsola.hr.query.TransferAccountInfoQuery;
import org.jsola.hr.vo.TransferAccountInfoListVO;
import org.jsola.hr.vo.TransferAccountInfoVO;
import org.jsola.hr.vo.payWx.VxBuildUserToken;
import org.jsola.hr.vo.payWx.VxWgkUserAuthResultVO;
import org.jsola.hr.vo.payWx.checkFace.VxCheckFaceReturnVO;

import java.util.List;

/**
 * 转账账户库
 *
 * @author zhr
 */
@Api(tags = "hr-转账账户库")
public interface ITransferAccountInfoControllerAPI {

    /**
     * 新增转账账户库
     * @param transferAccountInfoAddDTO 转账账户库新增实体
     * @return 转账账户库展示对象
     */
    @ApiOperation(value = "新增转账账户库")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "transferAccountInfoAddDTO", dataType = "TransferAccountInfoAddDTO", value = "新增转账账户库", paramType = "body")
    })
    Result<TransferAccountInfoVO> save(TransferAccountInfoAddDTO transferAccountInfoAddDTO);


    /**
     * 修改转账账户库
     * @param transferAccountInfoUpdateDTO 转账账户库
     * @return 更新数量
     */
    @ApiOperation(value = "修改转账账户库")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "transferAccountInfoUpdateDTO", dataType = "TransferAccountInfoUpdateDTO", value = "修改转账账户库", paramType = "body")
    })
    Result<Integer> update(TransferAccountInfoUpdateDTO transferAccountInfoUpdateDTO);




    /**
     * 删除单个转账账户库，彻底删除
     * @param transferAccountInfoId 转账账户库id
     * @return 删除数量
     */
    @ApiOperation(value="删除单个转账账户库，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "transferAccountInfoId", dataType = "String", value = "转账账户库id", paramType = "path")
    })
    Result<Integer> delete(String transferAccountInfoId);


    /**
     * 删除单个转账账户库，彻底删除（参数需要siteId）
     * @param transferAccountInfoId 转账账户库id
     * @param siteId 租户id
     * @return 删除数量
     */
    @ApiOperation(value="删除单个转账账户库，彻底删除（参数需要siteId）")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "transferAccountInfoId", dataType = "String", value = "转账账户库id", paramType = "path"),
            @ApiImplicitParam(name = "siteId", dataType = "String", value = "租户id", paramType = "path")
    })
    Result<Integer> deleteBySiteId(String transferAccountInfoId, String siteId);


    /**
     * 批量删除转账账户库，彻底删除
     * @param transferAccountInfoIds 转账账户库id集合
     * @return 删除数量
     */
    @ApiOperation(value = "批量删除转账账户库，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "transferAccountInfoIds", dataType = "String[]", value = "转账账户库id数组", paramType = "body" ,allowMultiple = true)
    })
    Result<Integer> deleteBatch(String[] transferAccountInfoIds);


    /**
     * 根据转账账户库id查询转账账户库详情
     * @param transferAccountInfoId 转账账户库id
     * @return 转账账户库详情
     */
    @ApiOperation(value="根据转账账户库id查询转账账户库详情")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "transferAccountInfoId", dataType = "String", value = "转账账户库id", paramType = "path")
    })
    Result<TransferAccountInfoVO> findById(String transferAccountInfoId);


    /**
     * 查询转账账户库
     * @param transferAccountInfoQuery 转账账户库查询参数
     * @return page
     */
    @ApiOperation(value="查询转账账户库")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "transferAccountInfoQuery", dataType = "TransferAccountInfoQuery", value = "转账账户库查询参数", paramType = "query")
    })
    Result<List<TransferAccountInfoListVO>> listAll(TransferAccountInfoQuery transferAccountInfoQuery);


     /**
     * 分页查询转账账户库
     * @param transferAccountInfoQuery 转账账户库查询参数
     * @return page
     */
    @ApiOperation(value="分页查询转账账户库")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "transferAccountInfoQuery", dataType = "TransferAccountInfoQuery", value = "转账账户库查询参数", paramType = "query")
    })
    Result<Page<TransferAccountInfoListVO>> page(TransferAccountInfoQuery transferAccountInfoQuery);

    /**
     * 分页查询转账账户库(不区分租户)
     * @param transferAccountInfoQuery 转账账户库查询参数
     * @return page
     */
    @ApiOperation(value="分页查询转账账户库(不区分租户)")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "transferAccountInfoQuery", dataType = "TransferAccountInfoQuery", value = "转账账户库查询参数", paramType = "query")
    })
    Result<Page<TransferAccountInfoListVO>> pageNoSiteId(TransferAccountInfoQuery transferAccountInfoQuery);

    /**
     * 查询租户的微信账户余额（查询到结果会修改账户表的余额信息）
     * @return 租户账户List
     */
    @ApiOperation(value="查询租户的微信账户余额（查询到结果会修改账户表的余额信息）")
    Result<List<TransferAccountInfoVO>> selectVxAccountMoney();

    /**
     * 生成支付宝签约链接
     * @param loginId 支付宝登录账号
     * @return 签约链接
     */
    @ApiOperation(value="生成支付宝签约链接")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "loginId", dataType = "String", value = "支付宝登录账号", paramType = "path")
    })
    Result<String> generateZfbSignUrl(String loginId);

    /**
     * 根据账户id 生成安全发需要的记账本(同步保存记账本id)
     * @param transferAccountInfoId 账户id
     * @return 记账本id
     */
    @ApiOperation(value="根据账户id 生成安全发需要的记账本(同步保存记账本id)")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "transferAccountInfoId", dataType = "String", value = "账户id", paramType = "path")
    })
    Result<String> generateZfbSafetyPayAccountBook(String transferAccountInfoId);

    /**
     * 查询租户的支付宝安全发账户余额（查询到结果会修改账户表的余额信息）
     * @return 租户账户List
     */
    @ApiOperation(value="查询租户的支付宝安全发账户余额（查询到结果会修改账户表的余额信息）")
    Result<List<TransferAccountInfoVO>> selectZfbSafetyAccountMoney();

    /**
     * 生成支付宝付款链接(向记账本里面充值的链接)
     * @param transferAccountInfoId 账户id
     * @param money 充值金额
     * @return 签约链接
     */
    @ApiOperation(value="生成支付宝付款链接(向记账本里面充值的链接)")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "transferAccountInfoId", dataType = "String", value = "账户id", paramType = "path"),
            @ApiImplicitParam(name = "money", dataType = "Double", value = "账户id", paramType = "path")
    })
    Result<String> generateZfbMoneyToBookUrl(String transferAccountInfoId, Double money);

    /**
     * 查询用户授权状态
     * @param openId openid
     * @param siteId 租户id
     * @return 授权状态
     */
    @ApiOperation(value="查询用户授权状态")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "openId", dataType = "String", value = "openid", paramType = "path"),
            @ApiImplicitParam(name = "siteId", dataType = "String", value = "租户id", paramType = "path")
    })
    Result<VxWgkUserAuthResultVO> selectUserAuthStatus(String openId, String siteId);

    /**
     * 微工卡 生成授权token
     * @param vxBuildUserToken 生成token需要的参数
     * @param siteId 租户id
     * @return token
     */
    @ApiOperation(value="微工卡 生成授权token")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "vxBuildUserToken", dataType = "VxBuildUserToken", value = "vxBuildUserToken", paramType = "body"),
            @ApiImplicitParam(name = "siteId", dataType = "String", value = "租户id", paramType = "path")
    })
    Result<VxCheckFaceReturnVO> buildAuthToken(VxBuildUserToken vxBuildUserToken, String siteId);

    /**
     * 查询租户的银行账户余额（查询到结果会修改账户表的余额信息）
     * @return 租户账户List
     */
    @ApiOperation(value="查询租户的银行账户余额（查询到结果会修改账户表的余额信息）")
    Result<List<TransferAccountInfoVO>> selectPingAnBankAccountMoney();


}

